Dazu gibt es auch einen kleinen Patch. Dadurch werden allerdings jetzt bei jedem restoreFilter() alle Caches durchlaufen. Nicht nur, wenn der Filter gesetzt ist. Aber ich denke, das ist eher gut so, als dass es schadet.huzzel schrieb:Nächste Kleinigkeit:
Wenn ich einen Cache auf die Blackliste setzte und geh dann wieder auf die Listenansicht, dann sollte der Cache doch in der Listenansicht verschwunden sein und nicht erst, wenn ich mir die Blackliste angeschaut habe
Index: src/CacheWolf/Profile.java
===================================================================
--- src/CacheWolf/Profile.java (revision 1400)
+++ src/CacheWolf/Profile.java (working copy)
@@ -302,6 +302,8 @@
}
} else if (filterActive==Filter.FILTER_CACHELIST) {
//flt.filterActive=filterActive;
+ } else if (filterActive==Filter.FILTER_INACTIVE) {
+ flt.clearFilter();
}
}
Index: src/CacheWolf/MainTab.java
===================================================================
--- src/CacheWolf/MainTab.java (revision 1400)
+++ src/CacheWolf/MainTab.java (working copy)
@@ -193,7 +193,7 @@
updatePendingChanges();
if (detP.hasBlackStatusChanged()) {
// Restore the filter status (this automatically sets the status for blacklisted caches)
- Global.getProfile().restoreFilter();
+ Global.getProfile().restoreFilter( true );
tbP.refreshTable();
}
break;
Index: src/CacheWolf/Profile.java
===================================================================
--- src/CacheWolf/Profile.java (revision 1400)
+++ src/CacheWolf/Profile.java (working copy)
@@ -291,6 +291,10 @@
* The values of Filter.isActive and Filter.isInactive are set by the filter
**/
void restoreFilter() {
+ restoreFilter( false );
+ }
+
+ void restoreFilter(boolean clearIfInactive) {
boolean inverted=filterInverted; // Save it as doFilter will clear filterInverted
Filter flt=new Filter();
if (filterActive==Filter.FILTER_ACTIVE) {
@@ -302,6 +306,10 @@
}
} else if (filterActive==Filter.FILTER_CACHELIST) {
//flt.filterActive=filterActive;
+ } else if (filterActive==Filter.FILTER_INACTIVE) {
+ if (clearIfInactive) {
+ flt.clearFilter();
+ }
}
}