mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-06 03:39:51 +00:00
Save/restore window size of the file selector (fix #2756 in some way)
This commit is contained in:
parent
7f56db58b7
commit
c46927dce6
@ -56,6 +56,8 @@ using namespace ui;
|
||||
|
||||
namespace {
|
||||
|
||||
const char* kConfigSection = "FileSelector";
|
||||
|
||||
template<class Container>
|
||||
class NullableIterator {
|
||||
public:
|
||||
@ -428,6 +430,7 @@ bool FileSelector::show(
|
||||
|
||||
remapWindow();
|
||||
centerWindow();
|
||||
load_window_pos(this, kConfigSection);
|
||||
|
||||
// Change the file formats/extensions to be shown
|
||||
std::string initialExtension = base::get_file_extension(initialPath);
|
||||
@ -694,6 +697,16 @@ again:
|
||||
return (!output.empty());
|
||||
}
|
||||
|
||||
bool FileSelector::onProcessMessage(ui::Message* msg)
|
||||
{
|
||||
switch (msg->type()) {
|
||||
case kCloseMessage:
|
||||
save_window_pos(this, kConfigSection);
|
||||
break;
|
||||
}
|
||||
return app::gen::FileSelector::onProcessMessage(msg);
|
||||
}
|
||||
|
||||
// Updates the content of the combo-box that shows the current
|
||||
// location in the file-system.
|
||||
void FileSelector::updateLocation()
|
||||
|
@ -45,6 +45,8 @@ namespace app {
|
||||
base::paths& output);
|
||||
|
||||
private:
|
||||
bool onProcessMessage(ui::Message* msg) override;
|
||||
|
||||
void updateLocation();
|
||||
void updateNavigationButtons();
|
||||
void addInNavigationHistory(IFileItem* folder);
|
||||
|
Loading…
x
Reference in New Issue
Block a user