merge with dev

This commit is contained in:
Desmis
2017-06-11 18:38:31 +02:00
33 changed files with 215 additions and 138 deletions

View File

@@ -39,7 +39,7 @@ void ProfilePanel::cleanup ()
delete partialProfileDlg;
}
ProfilePanel::ProfilePanel () : storedPProfile(nullptr), lastFilename(""), imagePath("")
ProfilePanel::ProfilePanel () : storedPProfile(nullptr), lastFilename(""), imagePath(""), lastSavedPSE(nullptr), customPSE(nullptr)
{
tpc = nullptr;
@@ -128,6 +128,8 @@ ProfilePanel::~ProfilePanel ()
delete profileFillModeOnImage;
delete profileFillModeOffImage;
delete lastSavedPSE;
delete customPSE;
}
bool ProfilePanel::isCustomSelected()
@@ -164,14 +166,24 @@ Gtk::TreeIter ProfilePanel::getLastSavedRow()
Gtk::TreeIter ProfilePanel::addCustomRow()
{
const ProfileStoreEntry *customPSE = new ProfileStoreEntry(Glib::ustring ("(" + M("PROFILEPANEL_PCUSTOM") + ")"), PSET_FILE, 0, 0);
if(customPSE) {
delete customPSE;
customPSE = nullptr;
}
customPSE = new ProfileStoreEntry(Glib::ustring ("(" + M("PROFILEPANEL_PCUSTOM") + ")"), PSET_FILE, 0, 0);
Gtk::TreeIter newEntry = profiles->addRow(customPSE);
return newEntry;
}
Gtk::TreeIter ProfilePanel::addLastSavedRow()
{
const ProfileStoreEntry *lastSavedPSE = new ProfileStoreEntry(Glib::ustring ("(" + M("PROFILEPANEL_PLASTSAVED") + ")"), PSET_FILE, 0, 0);
if(lastSavedPSE) {
delete lastSavedPSE;
lastSavedPSE = nullptr;
}
lastSavedPSE = new ProfileStoreEntry(Glib::ustring ("(" + M("PROFILEPANEL_PLASTSAVED") + ")"), PSET_FILE, 0, 0);
Gtk::TreeIter newEntry = profiles->addRow(lastSavedPSE);
return newEntry;
}