Browse Source

Make getfilename_sorted standard for listings

pull/1/head
Scott Lahteine 6 years ago
parent
commit
f9b80e7217
  1. 6
      Marlin/src/lcd/extensible_ui/ui_api.cpp
  2. 6
      Marlin/src/lcd/menu/menu_sdcard.cpp
  3. 2
      Marlin/src/sd/cardreader.h

6
Marlin/src/lcd/extensible_ui/ui_api.cpp

@ -570,11 +570,7 @@ namespace UI {
#endif #endif
pos; pos;
#if ENABLED(SDCARD_SORT_ALPHA) card.getfilename_sorted(nr);
card.getfilename_sorted(nr);
#else
card.getfilename(nr);
#endif
return card.filename && card.filename[0] != '\0'; return card.filename && card.filename[0] != '\0';
#endif #endif
} }

6
Marlin/src/lcd/menu/menu_sdcard.cpp

@ -116,11 +116,7 @@ void menu_sdcard() {
#endif #endif
i; i;
#if ENABLED(SDCARD_SORT_ALPHA) card.getfilename_sorted(nr);
card.getfilename_sorted(nr);
#else
card.getfilename(nr);
#endif
if (card.filenameIsDir) if (card.filenameIsDir)
MENU_ITEM(sddirectory, MSG_CARD_MENU, card); MENU_ITEM(sddirectory, MSG_CARD_MENU, card);

2
Marlin/src/sd/cardreader.h

@ -103,6 +103,8 @@ public:
FORCE_INLINE void setSortFolders(int i) { sort_folders = i; presort(); } FORCE_INLINE void setSortFolders(int i) { sort_folders = i; presort(); }
//FORCE_INLINE void setSortReverse(bool b) { sort_reverse = b; } //FORCE_INLINE void setSortReverse(bool b) { sort_reverse = b; }
#endif #endif
#else
FORCE_INLINE void getfilename_sorted(const uint16_t nr) { getfilename(nr); }
#endif #endif
#if ENABLED(POWER_LOSS_RECOVERY) #if ENABLED(POWER_LOSS_RECOVERY)

Loading…
Cancel
Save