The (custom) entry was added to the combobox at each profile loading
See issue #5092
This commit is contained in:
parent
d47a54fb3d
commit
71a5521b66
@ -167,6 +167,7 @@ Gtk::TreeIter ProfilePanel::getLastSavedRow()
|
|||||||
Gtk::TreeIter ProfilePanel::addCustomRow()
|
Gtk::TreeIter ProfilePanel::addCustomRow()
|
||||||
{
|
{
|
||||||
if(customPSE) {
|
if(customPSE) {
|
||||||
|
profiles->deleteRow(customPSE);
|
||||||
delete customPSE;
|
delete customPSE;
|
||||||
customPSE = nullptr;
|
customPSE = nullptr;
|
||||||
}
|
}
|
||||||
@ -179,6 +180,7 @@ Gtk::TreeIter ProfilePanel::addCustomRow()
|
|||||||
Gtk::TreeIter ProfilePanel::addLastSavedRow()
|
Gtk::TreeIter ProfilePanel::addLastSavedRow()
|
||||||
{
|
{
|
||||||
if(lastSavedPSE) {
|
if(lastSavedPSE) {
|
||||||
|
profiles->deleteRow(lastSavedPSE);
|
||||||
delete lastSavedPSE;
|
delete lastSavedPSE;
|
||||||
lastSavedPSE = nullptr;
|
lastSavedPSE = nullptr;
|
||||||
}
|
}
|
||||||
|
@ -356,3 +356,11 @@ Gtk::TreeIter ProfileStoreComboBox::addRow (const ProfileStoreEntry *profileStor
|
|||||||
return newEntry;
|
return newEntry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @brief Delete a row from the first level of the tree */
|
||||||
|
void ProfileStoreComboBox::deleteRow (const ProfileStoreEntry *profileStoreEntry)
|
||||||
|
{
|
||||||
|
Gtk::TreeIter entry = findRowFromEntry(profileStoreEntry);
|
||||||
|
if (entry) {
|
||||||
|
refTreeModel->erase(entry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -90,6 +90,7 @@ public:
|
|||||||
bool setInternalEntry ();
|
bool setInternalEntry ();
|
||||||
Gtk::TreeIter getRowFromLabel (Glib::ustring name);
|
Gtk::TreeIter getRowFromLabel (Glib::ustring name);
|
||||||
Gtk::TreeIter addRow (const ProfileStoreEntry *profileStoreEntry);
|
Gtk::TreeIter addRow (const ProfileStoreEntry *profileStoreEntry);
|
||||||
|
void deleteRow (const ProfileStoreEntry *profileStoreEntry);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user